package com.unimas.dof.render;

import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;

import com.unimas.dof.DOFContext;

public class StringRender implements DOFRender<String> {

	public void render(String view, DOFContext context) throws Exception {
		HttpServletResponse response = context.getResponse();
		if(response.isCommitted()){
			return;
		}
		if(view == null){
			return;
		}
		PrintWriter out = response.getWriter();
		out.println(view);
		out.flush();
		out.close();
	}

}
